using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;

namespace ctsu.Admin.Forms
{	
	public class SelectQADialog : System.Windows.Forms.Form
	{
		public int SearchChoice = 0;

		private System.Windows.Forms.Button btnCancel;
		private System.Windows.Forms.RadioButton rdo0;
		private System.Windows.Forms.RadioButton rdo4;
		private System.Windows.Forms.RadioButton rdo3;
		private System.Windows.Forms.RadioButton rdo2;
		private System.Windows.Forms.RadioButton rdo1;
		private System.Windows.Forms.Button btnOK;
		private System.Windows.Forms.RadioButton rdo5;
		
		private System.ComponentModel.Container components = null;

		public SelectQADialog()
		{
			InitializeComponent();		
		}

		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
            this.btnCancel = new System.Windows.Forms.Button();
            this.rdo0 = new System.Windows.Forms.RadioButton();
            this.rdo4 = new System.Windows.Forms.RadioButton();
            this.rdo3 = new System.Windows.Forms.RadioButton();
            this.rdo2 = new System.Windows.Forms.RadioButton();
            this.rdo1 = new System.Windows.Forms.RadioButton();
            this.btnOK = new System.Windows.Forms.Button();
            this.rdo5 = new System.Windows.Forms.RadioButton();
            this.SuspendLayout();
            // 
            // btnCancel
            // 
            this.btnCancel.Location = new System.Drawing.Point(120, 169);
            this.btnCancel.Name = "btnCancel";
            this.btnCancel.Size = new System.Drawing.Size(75, 23);
            this.btnCancel.TabIndex = 21;
            this.btnCancel.Text = "&Cancel";
            this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
            // 
            // rdo0
            // 
            this.rdo0.Checked = true;
            this.rdo0.Location = new System.Drawing.Point(8, 8);
            this.rdo0.Name = "rdo0";
            this.rdo0.Size = new System.Drawing.Size(200, 24);
            this.rdo0.TabIndex = 20;
            this.rdo0.TabStop = true;
            this.rdo0.Text = "Select by quality assurance";
            this.rdo0.CheckedChanged += new System.EventHandler(this.rdo_CheckedChanged);
            // 
            // rdo4
            // 
            this.rdo4.Location = new System.Drawing.Point(8, 136);
            this.rdo4.Name = "rdo4";
            this.rdo4.Size = new System.Drawing.Size(136, 24);
            this.rdo4.TabIndex = 19;
            this.rdo4.Text = "Select by protocol";
            this.rdo4.CheckedChanged += new System.EventHandler(this.rdo_CheckedChanged);
            // 
            // rdo3
            // 
            this.rdo3.Location = new System.Drawing.Point(8, 104);
            this.rdo3.Name = "rdo3";
            this.rdo3.Size = new System.Drawing.Size(136, 24);
            this.rdo3.TabIndex = 18;
            this.rdo3.Text = "Select by patient";
            this.rdo3.CheckedChanged += new System.EventHandler(this.rdo_CheckedChanged);
            // 
            // rdo2
            // 
            this.rdo2.Location = new System.Drawing.Point(8, 72);
            this.rdo2.Name = "rdo2";
            this.rdo2.Size = new System.Drawing.Size(200, 24);
            this.rdo2.TabIndex = 17;
            this.rdo2.Text = "Select by admissions";
            this.rdo2.CheckedChanged += new System.EventHandler(this.rdo_CheckedChanged);
            // 
            // rdo1
            // 
            this.rdo1.Location = new System.Drawing.Point(8, 40);
            this.rdo1.Name = "rdo1";
            this.rdo1.Size = new System.Drawing.Size(200, 24);
            this.rdo1.TabIndex = 16;
            this.rdo1.Text = "Select by outpatient visit";
            this.rdo1.CheckedChanged += new System.EventHandler(this.rdo_CheckedChanged);
            // 
            // btnOK
            // 
            this.btnOK.Location = new System.Drawing.Point(32, 169);
            this.btnOK.Name = "btnOK";
            this.btnOK.Size = new System.Drawing.Size(75, 23);
            this.btnOK.TabIndex = 15;
            this.btnOK.Text = "&OK";
            this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
            // 
            // rdo5
            // 
            this.rdo5.Location = new System.Drawing.Point(8, 168);
            this.rdo5.Name = "rdo5";
            this.rdo5.Size = new System.Drawing.Size(136, 24);
            this.rdo5.TabIndex = 22;
            this.rdo5.Text = "Select by investigator";
            this.rdo5.Visible = false;
            this.rdo5.CheckedChanged += new System.EventHandler(this.rdo_CheckedChanged);
            // 
            // SelectQADialog
            // 
            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
            this.ClientSize = new System.Drawing.Size(226, 201);
            this.ControlBox = false;
            this.Controls.Add(this.btnCancel);
            this.Controls.Add(this.rdo0);
            this.Controls.Add(this.rdo4);
            this.Controls.Add(this.rdo3);
            this.Controls.Add(this.rdo2);
            this.Controls.Add(this.rdo1);
            this.Controls.Add(this.btnOK);
            this.Controls.Add(this.rdo5);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
            this.Name = "SelectQADialog";
            this.Text = "Select QA";
            this.ResumeLayout(false);

		}
		#endregion

		private void btnOK_Click(object sender, System.EventArgs e)
		{
			this.Close();
		}

		private void rdo_CheckedChanged(object sender, System.EventArgs e)
		{
			if(rdo0.Checked)
				this.SearchChoice = 0;
			else if(rdo1.Checked)
				this.SearchChoice = 1;			
			else if(rdo2.Checked)
				this.SearchChoice = 2;			
			else if(rdo3.Checked)
				this.SearchChoice = 3;			
			else if(rdo4.Checked)
				this.SearchChoice = 4;			
			else if(rdo5.Checked)
				this.SearchChoice = 5;			
		}

		private void btnCancel_Click(object sender, System.EventArgs e)
		{
			this.SearchChoice = -1;
			this.Close();
		}
	}
}
